package com.ruge.seckill.domain.model;

import com.ruge.core.domain.BaseDomain;
import lombok.*;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.io.Serializable;

/**
 * @author ruge.wu
 * @since 2022/1/26 15:48
 */
@Getter
@Setter
@Builder
@Entity
@ToString
@NoArgsConstructor
@AllArgsConstructor
@Table(name = "sec_kill_order")
@org.hibernate.annotations.Table(appliesTo = "sec_kill_order", comment = "秒杀订单信息表")
public class SeckillOrder extends BaseDomain implements Serializable {
    @Column(columnDefinition = "varchar(20) comment '订单编号'")
    private String orderNo;
    @Column(columnDefinition = "varchar(20) comment '优惠券id'")
    private String couponId;
    @Column(columnDefinition = "int comment '用户id'")
    private Long userId;
    @Column(columnDefinition = "int comment '支付方式 0=微信支付 1=支付宝'")
    private int payment;
    @Column(columnDefinition = "int comment '订单状态 -1=已取消 0=未支付 1=已支付 2=已消费 3=已过期'")
    private int status;
    @Column(columnDefinition = "int comment '订单类型 0=正常订单 1=抢购订单'")
    private int orderType;
    @Column(columnDefinition = "int comment '秒杀id'")
    private int secKillId;
}
